#include <algorithm/analytical_model/CommonPara.h>
#include <algorithm/analytical_model/Constants.h>
#include <algorithm/analytical_model/HeliostatPara.h>
#include <algorithm/analytical_model/ScenePara.h>
#include <algorithm/analytical_model/SimulationPara.h>
#include <algorithm/analytical_model/algorithm/ModelPara.h>
#include <algorithm/analytical_model/algorithm/simplified/HFLCALBasedCommon.h>
#include <algorithm/analytical_model/simplified/HFLCALPara.h>
#include <utils/HasValue.h>
#include <utils/ParaUtils.h>
#include <utils/config.h>

using namespace solar;

template <>
void solar::computeSigma(SimulationPara* simulation_para, ScenePara* scene_para,
                         HeliostatPara* heliostat_para, CommonPara* common_para, Sun* sun,
                         Heliostat* heliostat, Receiver* receiver, HFLCALPara* ptr)
{
    const auto [sigma, peak_flux_param] = internal::computeHFLCALBasedSigma(
        simulation_para, scene_para, heliostat_para, sun, heliostat, receiver);
    SOLAR_SET_VALUE(HFLCALPara, sigma_, sigma, *ptr)
    SOLAR_SET_VALUE(HFLCALPara, flux_param_, peak_flux_param, *ptr)
}
